//测试CubeMap的像素着色器

//顶点着色器输出
struct VS_OUTPUT
{
    float4 Pos : SV_POSITION;
    float3 Normal : NORMAL;
	float2 TexCoord : TEXCOORD0;
	float3 WorldPosition : TEXCOORD1;
};

TextureCube ourCubeMap : register( t9 );
SamplerState ourSampler : register( s5 );

cbuffer SceneData : register( b7 )
{
	matrix View;
	matrix Projection;
	float4 lightDir;
	float4 eyePosition;
}

float4 Main( VS_OUTPUT input ) : SV_Target
{

	//采样的方向就是法线方向
	float3 SampleDir = input.Normal;
	
	//采样立方体贴图获得颜色
	return ourCubeMap.Sample( ourSampler, SampleDir );
}
